package my.senix.sc;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

//import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * Hello world!
 */
//@EnableDiscoveryClient
@SpringBootApplication
public class AppLauncher {


    public static void main(String[] args) {

        ConfigurableApplicationContext ctx = new SpringApplicationBuilder()
//                .web(WebApplicationType.SERVLET)
                .web(WebApplicationType.SERVLET)
                .sources(AppLauncher.class)
                .profiles("test","dev")
                .run(args);

      /*  ConfigurableEnvironment environment = ctx.getEnvironment();

        String property = environment.getProperty("my.age");
        System.out.println(property);

        String port = environment.getProperty("server.port");
        System.out.println("***********port: " + port + " ************");*/
    }
}
